package com.icepeach.icepeachhomeback.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.icepeach.icepeachhomeback.entity.Relation;
import com.icepeach.icepeachhomeback.mapper.RelationMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * @author 24273
 * @description 针对表【relation】的数据库操作Service
 * @createDate 2023-05-03 21:48:38
 */
public interface RelationService extends IService<Relation> {

    /**
     * 批量插入关系记录（指定businessId）
     * @param businessType
     * @param targetType
     * @param businessId
     * @param businessName
     * @param targetIdList
     */
    void batchInsertRelationByBusinessId(Integer businessType, Integer targetType, String businessId,String businessName, List<String> targetIdList);

    /**
     * 批量插入关系记录（指定targetId）
     * @param businessType
     * @param targetType
     * @param targetId
     * @param targetName
     * @param businessIdList
     */
    void batchInsertRelationByTargetId(Integer businessType, Integer targetType, String targetId, String targetName,List<String> businessIdList);

    /**
     * 组装关系表的list（指定businessId）
     * @param businessType
     * @param targetType
     * @param businessId
     * @param businessName
     * @param targetIdList
     * @return
     */
    List<Relation> buildRelationByBusinessId(Integer businessType, Integer targetType, String businessId,String businessName, List<String> targetIdList);

    /**
     * 组装关系表的list（指定targetId）
     * @param businessType
     * @param targetType
     * @param targetId
     * @param targetName
     * @param businessIdList
     * @return
     */
    List<Relation> buildRelationByTargetId(Integer businessType, Integer targetType, String targetId,String targetName, List<String> businessIdList);
}
